1. Technical Field
The present description refers to the technical field of processing of digital images and in particular it refers to a processing method and apparatus for filtering a digital image aimed at removing red and/or golden eye artifacts from it.
2. Description of the Related Art
As known, the so-called red eye phenomenon consists of an artifact introduced into a photograph due to the reflection of the light of a flash by the retina of the eye of a person. This phenomenon happens following the occurrence of some conditions both in analog photography, i.e., traditional film photography, and in digital photography. The red eye phenomenon is generally more accentuated when the bulb provided to emit the flash light is close to the lens of the image acquisition device, as typically occurs, for example, in a compact digital camera.
In the state of the art numerous solutions have been proposed aimed at either reducing or eliminating the effects of the aforementioned phenomenon.
For example, it is now usual for digital cameras to foresee a flash production method in accordance with which the flash bulb of the cameras is controlled so as to emit a rapid series of pre-flashes before the final flash after which the actual image acquisition occurs. In practice, the rapid series of pre-flashes determines a contraction of the pupil and therefore in this way reduces the reflective area of an eye. Although the aforementioned expedient does not completely eliminate the effects of this phenomenon, it does nevertheless effectively attenuate it. However, the approach described above has the drawback of requiring high energy consumption, since the flash bulb is the component that consumes the most in a digital camera. Moreover, the successions of flashes can cause discomfort to the subject having their picture taken. Finally, the same subject can be incorrectly made to think that the series of pre-flashes is the flash associated with the actual image acquisition, and therefore they may move before the actual acquisition and thus alter the pose.
In the state of the art there are also different correction methods of digital images that operate in post-processing, i.e., after the digital image has been acquired. In such methods there is generally a step of detection of the presence of the artifact and a subsequent correction step, in particular filtering of the red and/or golden eye artifacts. Some of these methods, for example implemented in image processing programmes, are not completely automatic because they involve significant interaction from the operator. In order to overcome this serious limitation, numerous completely automatic methods have recently been developed. Some of these methods, like for example the one described in “Automatic red-eye Detection and Correction”, by M. Gaubatz and R. Ulichney, Proc. of the IEEE Conf. Image Processing, pp. 804-807, NY 2002, use face and skin detection algorithms to identify possible areas of the images to correct. In these cases, the results are greatly influenced by the performance of the face and skin detection algorithms.
“Automatic Red-Eye Removal Based on Sclera and Skin Tone Detection”, by F. Volken, J. Terrier, P. Vandewalle, CGIV 2006, Society for Imaging Science and Technology, p. 359-364, 2006 describes a correction/filtering method in which the identification of red eyes to be corrected is carried out by searching for suitable colors and suitable shapes within the image. This approach is based on the fact that the eye is characterised by its shape and by the white color of the sclera. By combining this intuitive approach with a good skin detection algorithm, the authors of the aforementioned article managed to obtain good results.
U.S. Pat. No. 6,407,777 describes a filtration method in which the detection of red eye to be corrected is carried out by preliminarily checking for the presence of some conditions during the image acquisition and subsequently carrying out geometric nature tests on the regions of the images put forward as candidates for correction. This method has the advantage of not requiring any skin or face detection procedure, but it seems to provide good results in ideal conditions in which the photo displays “exemplary” red eyes. Without intending to discredit this method in any way, we believe that its performance is, however, quite limited in real situations different to these described above, for example in cases in which the photo depicts a face not facing forwards with respect to the acquisition device.
Another type of artifact very similar to the one described above is represented by the golden eye artifact, which consists of an unnatural luminosity of some pixels corresponding to portions of an image that depict an eye. The techniques to avoid the production of such an artifact or to correct it are totally analogous to those described above with reference to the red eye artifact.